package com.minimalist.basic.entity.po.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;

// Auto generate by mybatis-flex, do not modify it.
public class MNoticeTableDef extends TableDef {

    /**
     * 通知公告表 实体类。

 @author 小太阳
 @since 2024-10-18
     */
    public static final MNoticeTableDef MNOTICE = new MNoticeTableDef();

    /**
     * ID自增
     */
    public final QueryColumn ID = new QueryColumn(this, "id");

    /**
     * 状态  0禁用 1正常
     */
    public final QueryColumn STATUS = new QueryColumn(this, "status");

    /**
     * 逻辑删除
     */
    public final QueryColumn DELETED = new QueryColumn(this, "deleted");

    /**
     * 版本号
     */
    public final QueryColumn VERSION = new QueryColumn(this, "version");

    /**
     * 创建人ID
     */
    public final QueryColumn CREATE_ID = new QueryColumn(this, "create_id");

    /**
     * 公告ID
     */
    public final QueryColumn NOTICE_ID = new QueryColumn(this, "notice_id");

    /**
     * 更新人ID
     */
    public final QueryColumn UPDATE_ID = new QueryColumn(this, "update_id");

    /**
     * 是否置顶 0否 1是
     */
    public final QueryColumn NOTICE_TOP = new QueryColumn(this, "notice_top");

    /**
     * 创建时间
     */
    public final QueryColumn CREATE_TIME = new QueryColumn(this, "create_time");

    /**
     * 外部跳转链接
     */
    public final QueryColumn NOTICE_LINK = new QueryColumn(this, "notice_link");

    /**
     * 排序
     */
    public final QueryColumn NOTICE_SORT = new QueryColumn(this, "notice_sort");

    /**
     * 公告类型（1公告）
     */
    public final QueryColumn NOTICE_TYPE = new QueryColumn(this, "notice_type");

    /**
     * 更新时间
     */
    public final QueryColumn UPDATE_TIME = new QueryColumn(this, "update_time");

    /**
     * 公告标题
     */
    public final QueryColumn NOTICE_TITLE = new QueryColumn(this, "notice_title");

    /**
     * 发布时间
     */
    public final QueryColumn PUBLISH_TIME = new QueryColumn(this, "publish_time");

    /**
     * 公告内容
     */
    public final QueryColumn NOTICE_CONTENT = new QueryColumn(this, "notice_content");

    /**
     * 发布部门
     */
    public final QueryColumn PUBLISH_DEPT_ID = new QueryColumn(this, "publish_dept_id");

    /**
     * 是否外链 0否 1是
     */
    public final QueryColumn NOTICE_OUT_CHAIN = new QueryColumn(this, "notice_out_chain");

    /**
     * 封面图文件ID，多个使用 , 分割
     */
    public final QueryColumn NOTICE_PIC_FILE_ID = new QueryColumn(this, "notice_pic_file_id");

    /**
     * 发布人
     */
    public final QueryColumn PUBLISH_AUTHOR_ID = new QueryColumn(this, "publish_author_id");

    /**
     * 延时发布的时间
     */
    public final QueryColumn NOTICE_TIME_INTERVAL = new QueryColumn(this, "notice_time_interval");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, STATUS, VERSION, CREATE_ID, NOTICE_ID, UPDATE_ID, NOTICE_TOP, CREATE_TIME, NOTICE_LINK, NOTICE_SORT, NOTICE_TYPE, UPDATE_TIME, NOTICE_TITLE, PUBLISH_TIME, NOTICE_CONTENT, PUBLISH_DEPT_ID, NOTICE_OUT_CHAIN, NOTICE_PIC_FILE_ID, PUBLISH_AUTHOR_ID, NOTICE_TIME_INTERVAL};

    public MNoticeTableDef() {
        super("", "m_notice");
    }

    private MNoticeTableDef(String schema, String name, String alisa) {
        super(schema, name, alisa);
    }

    @Override
    public MNoticeTableDef as(String alias) {
        String key = getNameWithSchema() + "." + alias;
        return getCache(key, k -> new MNoticeTableDef("", "m_notice", alias));
    }

}
